 
 

import be.kuleuven.cs.som.annotate.Basic;
import be.kuleuven.cs.som.annotate.Immutable;


/**
 * A class that signals exceptions for invalid temperatures for a square
 * Every exception contains the illegal temperature and the square
 * 
 * @author Pieter
 *
 */

public class IllegalTemperatureException extends RuntimeException{
	
	/**
	 * The default serial number of the exception
	 *///als dit private...wegdoen dan via klikken op waarschuwing publc class...automatic generaten
		//van serial number
	private static final long serialVersionUID = 1L;

	
	

	/**
	 *
	 * @param	temperature
	 * 			the temperature of the new illegal temperature exception
	 * @param 	square
	 * 			the square for the illegal temperature exception
	 * @post	The temperature of the new illegal tempererature exception is the given temperature
	 * 			|new.getTemeprature() == temperature
	 * @post	The square of the new illegal temperature exception is the given square
	 * 			|new.getSquare() == square
	 */
	public IllegalTemperatureException(double temperature, Square square){
		this.temperature = temperature;
		this.square = square;
	}
	
	/**
	 * 
	 * @return the temperature of the illegal temperature exception
	 */
	@Basic @Immutable
	public double getTemperature(){
		return temperature;
	}

	/**
	 * Variable registering the temperature of the illegal temperature exception
	 */
	private final double temperature;
	
	/**
	 * @return the square of the illegal temperature exception
	 */
	@Basic @Immutable
	public Square getSquare(){
		return square;
	}
	
	/**
	 * Variable referring the square of the illegal temperature exception
	 */
	private final Square square;
	
}



